<?php 
function search_user($suser) {
	require("model/searchBD.php");
	$tab = search_user_db($suser);
	if(sizeof($tab['id_user']) > 0) {
		require("view/search.tpl");
	} else {
		$message = "Aucun resultat pour la recherche : $suser";
		require("view/search.tpl");
	}
}

function search_category($scategory) {
	require("model/searchBD.php");
	$tab = search_category_db($scategory);
	if(sizeof($tab['id_categ']) > 0) {
		require("view/search.tpl");
	} else {
		$message = "Aucun resultat pour la recherche : $scategory";
		require("view/search.tpl");
	}
}

function search_forum($sforum) {
	require("model/searchBD.php");
	$tab = search_forum_db($sforum);
	if(sizeof($tab['id_forum']) > 0) {
		require("view/search.tpl");
	} else {
		$message = "Aucun resultat pour la recherche : $sforum";
		require("view/search.tpl");
	}
}

function search_skill($sskill) {
	require("model/searchBD.php");
	$tab = search_skill_db($sskill);
	if(sizeof($tab['id_skill']) > 0) {
		require("view/search.tpl");
	} else {
		$message = "Aucun resultat pour la recherche : $sskill";
		require("view/search.tpl");
	}
}

?>